How to find the third largest number from an unsorted integer array which enter by user.
How to find the third largest number in an array using a loop?
1710
01-Feb-2023
Updated on 15-Jun-2023
Aryan Kumar
15-Jun-2023Here is a Java program to find the third largest number in an array using a loop:
Code snippet
This program will print the following output:
Code snippet
Rahul Roi
02-Feb-2023If we put index in negative value then throw an exception “Index Not Found”, like -1, -0, -2
If you put position value higher than length of array then throw an exception “Index Not Found” .
Output is →
9
7
8
Tehran Noorani
01-Feb-2023This is the simple C# program to find the third largest number from a given integer array.